version 8.2
capture clear
capture log close
set more off
set mem 510m
set mat 800



clear
use "data_mcgill_final"



drop if mean_group_quiz_notst>3
hist mean_group_quiz_notst, percent ttitle(Team Ability)
graph save "Figure1.gph", replace

****experimental design:
count
count if teamwork==1
count if teamwork==0
*581 students, in four classes over three years (2010-2011-2012)

replace monitoring=. if email_dummy_group==1

label variable mean_group_quiz_notst "Team Ability"
label variable quiz_bef "Baseline Ability"

global list_var	female fshortdum1 fshortdum2 fshortdum3 fshortdum4 fshortdum5 origin3_dum1 origin3_dum2 origin3_dum3 origin3_dum4 origin3_dum5 class_clean_dum2 class_clean_dum3 class_clean_dum4 quiz_bef mean_group_quiz_notst

eststo monitoring: estpost ttest $list_var, by(monitoring)

esttab monitoring using "Table1.xls", csv plain cells("mu_1(label(Control) fmt(2)) mu_2(label(Peer review)) b(label(Control-Peer review) star pvalue(p))" ". . p(label(p-value) par)") mtitles("Control vs Peer review") noobs replace label star(* 0.10 ** 0.05 *** 0.01) title(Table 1: Balance of observable characteristics)





exit

